package com.qdaily.ui.net.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created with IntelliJ IDEA.
 * User: Felix
 * Date: 3/30/15
 * Time: 17:50
 * QQ:74104
 * Email:lovejiuwei@gmail.com
 */
public class ArticleMetaTag implements Parcelable {
    private int id = 0;
    private String title = "";

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt( this.id );
        dest.writeString( this.title );
    }

    public ArticleMetaTag() {
    }

    private ArticleMetaTag(Parcel in) {
        this.id = in.readInt();
        this.title = in.readString();
    }

    public static final Parcelable.Creator<ArticleMetaTag> CREATOR = new Parcelable.Creator<ArticleMetaTag>() {
        public ArticleMetaTag createFromParcel(Parcel source) {
            return new ArticleMetaTag( source );
        }

        public ArticleMetaTag[] newArray(int size) {
            return new ArticleMetaTag[ size ];
        }
    };

    @Override
    public String toString() {
        return "ArticleMetaTag{" +
                "id=" + id +
                ", title='" + title + '\'' +
                '}';
    }
}
